# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kimagemapeditor
pkgver=24.02.2
pkgrel=0
# armhf blocked by extra-cmake-modules
# armv7, ppc64le, s390x, riscv64 and x86 blocked by qt6-qtwebengine
arch="all !armv7 !armhf !ppc64le !s390x !riscv64 !x86"
url="https://kde.org/applications/development/org.kde.kimagemapeditor"
pkgdesc="An editor of image maps embedded inside HTML files, based on the <map> tag"
license="GPL-2.0-or-later"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kcrash-dev
	kdbusaddons-dev
	kdoctools-dev
	kguiaddons-dev
	ki18n-dev
	kiconthemes-dev
	kparts-dev
	kwidgetsaddons-dev
	kxmlgui-dev
	qt6-qtbase-dev
	qt6-qtwebengine-dev
	samurai
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/graphics/kimagemapeditor.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kimagemapeditor-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DBUILD_WITH_QT6=ON \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
019e4d90b2430442deb6c0c0cfea28c21a98caa087810f022c5c5fb90667d4b1f6b13b385b08154f86ff7c49411ac44aeee1a5eeda4c7692bbe284337656f8c1  kimagemapeditor-24.02.2.tar.xz
"
